<!DOCTYPE html>
<html>
    <head>
        <meta charset=="utf-8">
        <title></title>
        <script src="vue.js" type="text/javascript" charset="utf-8"></script>
    </head>
    <body>
        <div id="app">
            <p>单个复选框：</p>
            <input type="checkbox" id="checkbox" v-model="checked">
            <label for="checkbox">{{checked}}</label>
            <p>多个复选框：</p>
            <input type="checkbox" id="check1" value="check1" v-model="checkednames">
            <label for="check1">check1</label>
            <input type="checkbox" id="check2" value="check2" v-model="checkednames">
            <label for="check2">check2</label>
            <input type="checkbox" id="check3" value="check3" v-model="checkednames">
            <label for="check3">check3</label>
            <br>
            <span>选择得值为：{{checkednames}}</span>
        </div>
        <script>
            new Vue({
                el: "#app",
                data: {
                    checked: false,
                    checkednames: []
                }
            })
        </script>
    </body>
</html>